<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
  <title>清华大学学生教育互联网公益协会</title>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
  <script th:src = "@{/js/jquery.min.js}"></script>
  <script th:src = "@{/js/bootstrap.min.js}"></script>

  <style>
    .navbar-brand {
      padding: 0 15px;
    }
    .volunteer {
      margin-top: 10px;
    }
  </style>
</head>
<body>
  <div class="container">
    <header>
      <nav class="navbar navbar-default bg-faded">
        <div class="container-fluid">
          <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" th:href="@{/}"><img th:src="@{/img/brand.jpg}" height="50"/></a>
          </div>

          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
              <li class="nav-item"><a th:href="@{/}">i玩问答</a></li>
              <li class="nav-item"><a th:href="@{/profile}">个人信息</a></li>
              <li class="nav-item active"><a href="#">哥哥姐姐</a></li>
              <li class="nav-item"><a th:if="${domain == null}" th:href="@{/look}">i玩课堂</a></li>
              <li class="nav-item"><a th:href="@{/logout}">退出登录</a></li>
            </ul>
          </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
      </nav>
    </header>
    <main>
      <form class="form-horizontal">
      	<!-- 
        <div class="form-group">
          <label for="sex" class="col-sm-2 control-label hidden-xs">科目</label>
          <div class="col-sm-10">
            <select id="sex" name="sex" class="form-control">
              <option value="">全部</option>
              <option th:each="subject : ${subjects}" th:value="${subject.id}" th:text="${subject.name}"></option>
            </select>
          </div>
        </div>
         -->
      </form>
      <div class="row">
        <div th:each="volunteer : ${volunteers}" class="col-md-6 col-lg-4 clearfix volunteer">
          <div class="col-xs-4">
            <img class="img-responsive" src="img/avatar.jpg" />
          </div>
          <div class="col-xs-8">
            <h2 th:text="${volunteer.nickname}?${volunteer.username}"></h2>
            <p th:text="${volunteer.profile}"></p>
            <!-- 
            <button class="btn btn-primary">提问</button>
            -->
          </div>
        </div>
      </div>
      <nav th:if="${volunteers.totalPages > 1}" aria-label="Page navigation">
		 <ul class="pagination">
		    <li th:if="${pagination.hasPrevious}">
		      <a href="${?page=' + (pagination.startPage - 2) + '&amp;status=' + status}" aria-label="Previous">
		        <span aria-hidden="true">&laquo;</span>
		      </a>
		    </li>
		    <li th:class="${i==pagination.currentPage? 'active':''}" th:each="i : ${#numbers.sequence( pagination.startPage, pagination.endPage )}">
		    	<a th:href="${i==pagination.currentPage? '#':'?page=' + (i-1) + '&amp;status=' + status}" th:text="${i}"></a>
		    </li>
		    <li th:if="${pagination.hasNext}">
		      <a href="${?page=' + (pagination.endPage) + '&amp;status=' + status}" aria-label="Next">
		        <span aria-hidden="true">&raquo;</span>
		      </a>
		    </li>
		  </ul>
	   </nav>
    </main>
  </div>
</body>
</html>
